<%--
  Created by IntelliJ IDEA.
  User: keda
  Date: 2019/11/18
  Time: 13:54
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<% String flag = request.getParameter("flag"); %>
<html>
  <head>
    <title>登录页</title>
    <script>
      var flag = Number(<%= flag %>);
      if (flag === 1) {
        alert('请先登录');
      }
    </script>
  </head>
  <body>
  <form action="loginServlet" method="post">
    <h1>系统登录</h1>
    <label>
      <span>用户名：</span>
      <input type="text" name="username">
    </label>
    <label>
      <span>密   码：</span>
      <input type="password" name="password">
    </label>
    <input type="submit" value="登录" />
  </form>
  </body>
</html>
